import BaseApi from '../BaseApi';

const controller = "/exceptionOrder";

export default {
    /**
     * @description 查询异常订单列表
     * @author LiuTing
     * @date 2021/09/07
     */
    getExceptionOrder(condition) {
        return this.requestPost(controller, "/getExceptionOrder", condition);
    },

    /**
     * @description 作废异常订单
     * @author LiuTing
     * @date 2021/09/09
     */
    finishExceptionOrder(condition) {
        return this.requestPost(controller, "/finishExceptionOrder", condition);
    },

    /**
     * @description 批量作废异常订单
     * @author LiuTing
     * @date 2021/09/09
     */
    finishExceptionOrders(id) {
        return this.requestPostForJson(controller, "/finishExceptionOrders", id);
    },

    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);
    },

    requestDownloadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    },

    requestPostForJson(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPostForJson(newUrl, condition);
    },
}